function sum(a, b, duration = 1000) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve(a + b)
    }, duration)
  })
}

;(async function() {
  const v1 = await sum(1, 2)
  const v2 = await sum(v1, 3)
  const v3 = await sum(v2, 4)
  return await sum(v3, 5)
})().then(value => {
  console.log('value = ', value)
}).catch(reason => {
  console.log('err = ', reason)
})